package edu.hcmus.sow.web.security;

import javax.servlet.http.HttpServletRequest;

import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;

public class CustomWebAuthenticationDetailsSource extends WebAuthenticationDetailsSource {

   // ~ Methods
   // ========================================================================================================

   /**
    * @param context
    *           the {@code HttpServletRequest} object.
    * @return the {@code WebAuthenticationDetails} containing information about the current request
    */
   @Override
   public WebAuthenticationDetails buildDetails(HttpServletRequest context) {
      return new CustomWebAuthenticationDetails(context);
   }
}
